home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / March 96 / Re Archiving question < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.0 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Archiving question
  2. Sent:        3/16/96 11:12 PM
  3. Received:    3/18/96 7:01 AM
  4. From:        Jim Lloyd, jim@melongem.com
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. At 7:26 PM 3/16/96, Arni McKinley wrote:
  9. >Let's suppose that I keep a pointer to an object, foo, in a class that I am
  10. >archiving:
  11. >
  12. >class FW_CLASS_ATTR CoolStuff
  13. >{
  14. >   MyClass *foo;
  15. >        etc
  16. >}
  17. >
  18. >When I write this CoolStuff out to the archive, it looks something like this:
  19. >
  20. >void CoolStuff::Flatten( FW_CWritableStream& archive )
  21. >{
  22. >   FW_WRITE_DYNAMIC_OBJECT( archive, foo, MyClass );
  23. >}
  24. >
  25. >
  26. >What happens if foo is NULL?  Will FW_READ_DYNAMIC_OBJECT recognize it as such?
  27.  
  28. In ODF 1.0d11 you can't ask the archiver to write out a NULL pointer (i.e.
  29. it will crash).  It was just something I hadn't designed for.  In ODF 1
  30. I've fixed that design oversight, and the archiver does the right thing
  31. when writing (and later reading) NULL pointers.
  32.  
  33. Jim Lloyd
  34. ODF Team
  35.  
  36.